package com.glsc.ngateway.common.base.domainmapper;

import com.glsc.ngateway.common.base.domain.mysql.gateway.platform.flow.FlowFormEquipmentApply;
import com.glsc.ngateway.common.api.flowable.dto.task.formData.equipment.domainDto.FlowFormEquipmentApplyDto;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @Author: xuchang
 * @Desc: domin到dto转换
 */
@Mapper(componentModel = "spring")
public interface FlowFormEquipmentApplyMapper {

    FlowFormEquipmentApplyMapper INSTANCE = Mappers.getMapper(FlowFormEquipmentApplyMapper.class);

    @Mapping(target = "appendicesFileList", ignore = true)
    FlowFormEquipmentApplyDto domain2dto(FlowFormEquipmentApply domain);


    List<FlowFormEquipmentApplyDto> domain2dto(List<FlowFormEquipmentApply> domain);

    @Mapping(target = "appendicesFileIdList", ignore = true)
    @Mapping(target = "insertTime", ignore = true)
    @Mapping(target = "updateTime", ignore = true)
    @Mapping(target = "deleted", ignore = true)
    FlowFormEquipmentApply dto2domain(FlowFormEquipmentApplyDto dto);

    List<FlowFormEquipmentApply> dto2domain(List<FlowFormEquipmentApplyDto> dto);
}
